import { observable, action } from '@/miniprogram_npm/mobx-miniprogram/index';

const tabbarStore = observable({
    current: 'home',

    setCurrent: action(function (payload) {
        this.current = payload;
    }),

    resetAll: action(function () {
        this.current = 'home';
    }),

    getCurrent() {
        return this.current;
    }
});

export default tabbarStore;
